import axios from '@/libs/api.request'
import platform from '@/config/platform'
// 获取组织树结构

export const getTreeList = data => {
        return axios.request({
            url: platform.BOOKING_WWX + '/org/tree',
            method: 'post',
            data
        })
    }
    // 获取所有组织树结构
export const getAllTree = params => {
        return axios.request({
            url: platform.BOOKING_WWX + `/org/all-tree`,
            method: 'get',
            params
        })
    }
    // 获取枚举

export const getEnumeration = data => {
    return axios.request({
        url: platform.COMMON + `/enumeration/${data.type}/${data.code}`,
        method: 'get',
    })
}

// 获取组织树结构1

export const getTreesList = params => {
    return axios.request({
        url: platform.BOOKING_WWX + '/org-quota/orgTree',
        method: 'get',
        params
    })
}

// 获取组织树结构1

export const getLiuboTreeList = params => {
    return axios.request({
        url: platform.AUTH_LIUBO + '/org/trends/tree',
        method: 'get',
        params
    })
}
// 新增模板分配部门
export const addTemplate = data => {
    return axios.request({
        url: platform.BOOKING_WWX + '/print-temp-link-org',
        method: 'post',
        data
    })
}
// 获取已绑定的部门id
export const getTemplate = params => {
    return axios.request({
        url: platform.BOOKING_WWX + '/print-temp-link-org/org-idlist-by-temp-id',
        method: 'get',
        params
    })
}